package com.nti56.springboot.mapper.tmsmapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;

import com.nti56.springboot.mapper.BaseMapper;
import com.nti56.springboot.model.User;
import com.nti56.springboot.model.UserRole;

@Mapper
public interface UserMapper extends BaseMapper<User>{
	
	
	/**
	 * shiro 验证登录使用
	 * @param userName
	 * @return
	 */
	public User findByUserName(String userName);
	
	/**
	 * shiro登录验证成功后，查找用户权限
	 * @param userName
	 * @return
	 */
	public User findUserAuth(String userName);
	
	public void insertUserRole(UserRole ur);
	
	/**
	 * 查用户角色信息
	 * @param map
	 * @return
	 */
	public List<User> getUserList(Map map);
	
	/**
	 * 查询用户名个数
	 * @param userName
	 * @return
	 */
	public int selectCnt(String userName);

}
